﻿using Dapper;
using System;
using BCEntity.OA.WorkflowTemplate.WorkflowTemplateStepFormCategory;
using System.Collections.Generic;
using System.Data;
using System.Text;
using System.Threading.Tasks;

namespace BCData.OA.WorkflowTemplate.WorkflowTemplateStepFormCategory
{
	/// <summary>
	/// 工作流模板步骤表单分类
	/// </summary>
	public interface IWorkflowTemplateStepFormCategoryData
	{
		#region  成员方法
		/// <summary>
		/// 是否存在该记录
		/// </summary>
		/// <param name="workflowTemplateStepFormCategoryId">工作流模板步骤表单分类Id</param>
		Task<bool> Exists(long workflowTemplateStepFormCategoryId);
		/// <summary>
		/// 是否存在该记录
		/// </summary>
		/// <param name="formCategoryCode">表单分类Code</param>
		Task<bool> Exists(string formCategoryCode);
		/// <summary>
		/// 增加工作流模板步骤表单分类
		/// </summary>
		/// <param name="entity">工作流模板步骤表单分类信息</param>
		Task<WorkflowTemplateStepFormCategoryEntity> Add(WorkflowTemplateStepFormCategoryEntity entity);
		/// <summary>
		/// 更新工作流模板步骤表单分类
		/// </summary>
		/// <param name="entity">工作流模板步骤表单分类信息</param>
		Task<WorkflowTemplateStepFormCategoryEntity> Update(WorkflowTemplateStepFormCategoryEntity entity);
		/// <summary>
		/// 删除工作流模板步骤表单分类
		/// </summary>
		/// <param name="workflowTemplateStepFormCategoryId">工作流模板步骤表单分类Id</param>
		Task<bool> Delete(long workflowTemplateStepFormCategoryId);
		/// <summary>
		/// 获取工作流模板步骤表单分类
		/// </summary>
		/// <param name="workflowTemplateStepFormCategoryId">工作流模板步骤表单分类Id</param>
		Task<WorkflowTemplateStepFormCategoryEntity> GetEntity(long workflowTemplateStepFormCategoryId);
		/// <summary>
		/// 获取工作流模板步骤表单分类
		/// </summary>
		/// <param name="formCategoryCode">表单分类Code</param>
		/// <returns></returns>
		Task<WorkflowTemplateStepFormCategoryEntity> GetEntity(string formCategoryCode);
		/// <summary>
		/// 获取工作流模板步骤表单分类列表
		/// </summary>
		Task<IEnumerable<WorkflowTemplateStepFormCategoryEntity>> GetList();
		/// <summary>
		/// 获取工作流模板步骤表单分类分页列表
		/// </summary>
		/// <param name="start">开始时间</param>
		/// <param name="end">结束时间</param>
		/// <param name="sortName">排序字段</param>
		/// <param name="ascending">升序</param>
		/// <param name="pageIndex">当前页码</param>
		/// <param name="pageSize">每页数据条数</param>
		Task<(IEnumerable<WorkflowTemplateStepFormCategoryEntity>, int)> Query(DateTime? start, DateTime? end, string sortName, bool? ascending, int pageIndex, int pageSize);
		#endregion  成员方法
	}


}